package com.yilin.platform.entity.user;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yilin.platform.base_core.application.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name="platform_configure")
@TableName(value = "platform_configure")
public class PlatConfigure extends BaseEntity {

    public enum SendInterval{
        none(0,"不自动上送"), minutes10(1,"每隔10分钟上送一次"), hourOne(2,"每隔1小时上送一次"), dayOne(3,"每隔一天上送一次");
        @EnumValue
        public Integer index;
        public String name;

        SendInterval(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    public enum RemindInterval{
        none(0,"不提醒"), onlyOne(1,"仅提醒一次"), day(2,"每天提醒一次");
        @EnumValue
        public Integer index;
        public String name;

        RemindInterval(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "plat_id")
    private String platId;//平台唯一ID
    @Column(name = "plat_name")
    private String platName;//平台名称
    @Column(name = "product_name")
    private String productName;//产品名称
    @Column(name = "product_code")
    private String productCode;//产品码

    @Column(name = "send_interval")
    private SendInterval sendInterval = SendInterval.none;//自动发送时间间隔
    @Column(name = "remind_interval")
    private RemindInterval remindInterval = RemindInterval.none;//提醒间隔
    @Column(name = "remind_phone")
    private String remindPhone;//提醒手机号

    @Column(name = "last_sent_time")
    private Date lastSentTime;//上次发送时间
    @Column(name = "last_sent_count")
    private Integer lastSentCount=0;//上次发条数

    @Column(name = "wait_sent_count")
    private Integer waitSentCount=0;//等待发送条数
    @Column(name = "sent_fail_count")
    private Integer sentFailCount=0;//发送失败条数
    @Column(name = "sent_success_count")
    private Integer sentSuccessCount=0;//发送失败条数

    public String getPlatId() {
        return platId;
    }

    public void setPlatId(String platId) {
        this.platId = platId;
    }

    public String getPlatName() {
        return platName;
    }

    public void setPlatName(String platName) {
        this.platName = platName;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public SendInterval getSendInterval() {
        return sendInterval;
    }

    public void setSendInterval(SendInterval sendInterval) {
        this.sendInterval = sendInterval;
    }

    public RemindInterval getRemindInterval() {
        return remindInterval;
    }

    public void setRemindInterval(RemindInterval remindInterval) {
        this.remindInterval = remindInterval;
    }

    public String getRemindPhone() {
        return remindPhone;
    }

    public void setRemindPhone(String remindPhone) {
        this.remindPhone = remindPhone;
    }

    public Date getLastSentTime() {
        return lastSentTime;
    }

    public void setLastSentTime(Date lastSentTime) {
        this.lastSentTime = lastSentTime;
    }

    public Integer getLastSentCount() {
        return lastSentCount;
    }

    public void setLastSentCount(Integer lastSentCount) {
        this.lastSentCount = lastSentCount;
    }

    public Integer getWaitSentCount() {
        return waitSentCount;
    }

    public void setWaitSentCount(Integer waitSentCount) {
        this.waitSentCount = waitSentCount;
    }

    public Integer getSentFailCount() {
        return sentFailCount;
    }

    public void setSentFailCount(Integer sentFailCount) {
        this.sentFailCount = sentFailCount;
    }

    public Integer getSentSuccessCount() {
        return sentSuccessCount;
    }

    public void setSentSuccessCount(Integer sentSuccessCount) {
        this.sentSuccessCount = sentSuccessCount;
    }
}